import express from 'express';
import { createTeam, getTeams, addMemberToTeam } from '../controllers/teamController';
import { protect } from '../middleware/authMiddleware';

const router = express.Router();

router.route('/')
  .post(protect, createTeam)
  .get(getTeams);

// 【新增】添加成员的路由
router.route('/:id/members').post(protect, addMemberToTeam);

export default router;